{js:artTemplate}
{js:areaSelect}
<article class="col-lg-12">
	<div class="card forms">
		<div class="card-header">
			<h3>添加从业人员</h3>
		</div>
		<div class="card-body">
			<form action='{url:/auxiliary/employeeAdd}' class="form-horizontal" method='post' name='employeeAdd'
				enctype='multipart/form-data'>
				<input type='hidden' name='id' value="" />
				<div class="module_content">
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">姓名</label>
						<div class="col-sm-10">
							<input name="name" class="form-control" value='' pattern='required' alt="填写姓名" />
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">头像</label>
						<div class="col-sm-10">
							<input name="avatar" type="file" class="form-control-file" />
							<div class="box">
								{if:isset($this->employeeRow['avatar']) && $this->employeeRow['avatar']}
								<img src="{url:$this->employeeRow['avatar']}" style='width:220px;border:1px solid #ccc' />
								{/if}
							</div>
							<small class="help-block-none">* 支持JPG/PNG格式，建议尺寸200x200</small>
						</div>
					</div>
					
					<div class="form-group row">
                        <label class="col-sm-2 col-form-label">所属学校</label>
                        <div class="col-sm-10">
                            <select name='type' class="form-control" pattern="required" onchange="createTicket();">
                                <option value="0">店铺全部商品适用</option>
                                <option value="1">店铺某单品适用</option>
                                <option value="2">店铺某分类适用</option>
                            </select>
                            <small class="help-block-none">* 选择优惠券使用条件</small>
                        </div>
                    </div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">简介</label>
						<div class="col-sm-10">
							<textarea name="introduction" class="form-control" rows="3" pattern='required' alt="填写从业人员简介"></textarea>
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">从业人员编号</label>
						<div class="col-sm-10">
							<input class="form-control" name='employee_number' value='' pattern='required' alt="填写唯一从业人员编号" />
							<small class="help-block-none">* 编号需唯一，建议使用工号或身份证后6位</small>
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">职务</label>
						<div class="col-sm-10">
							<input class="form-control" name='position' value='' pattern='required' alt="填写职务信息" />
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">状态</label>
						<div class="col-sm-10">
							<select name="status" class="form-control">
								<option value="在岗" selected>在岗</option>
								<option value="离岗">离岗</option>
								<option value="返岗">返岗</option>
								<option value="离职">离职</option>
							</select>
							<small class="help-block-none">* 从业人员当前工作状态</small>
						</div>
					</div>
					
					<div class="form-group row">
						<div class="col-sm-4 offset-sm-2">
							<input type="submit" class="btn btn-primary" value="确 定" />
							<input type="reset" class="btn btn-secondary" value="重 置" />
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>		
</article>

<script type='text/javascript'>
//DOM加载完毕
$(function(){
	//表单初始化
	var formObj = new Form('employeeAdd');
	formObj.init({echo:JSON::encode($this->employeeRow ?? [])});
});
</script>
